<?php
/***************************************************************************
 *   copyright : (C) 2009 Udrea Cristian
 *   site : http://code.google.com/p/testauction-php
 ***************************************************************************/

/***************************************************************************
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU Lesser General Public License as 
 *   published by the Free Software Foundation; either version 2 of the
 *   License, or (at your option) any later version. Although none of the
 *   code may be sold. If you have been sold this script, get a refund.
 ***************************************************************************/
define('APP_ROOT', '../../');
//###############################################
include(APP_ROOT.'include/session.php');
if(!$session->logged_in && !$session->isAdmin()) {
	$session->logout();
	header('Location: ../index.php');
}

$view = (isset($_GET['view']) && $_GET['view'] != '') ? $_GET['view'] : '';
$find = (isset($_GET['find']) && $_GET['find'] != '') ? $_GET['find'] : '';
(isset($_GET['productId']) && $_GET['productId'] != '') ? $productID = $_GET['productId'] : '';

switch ($view) {
	case 'open' :
		$content    = 'list_open.php';
		$pageTitle  = 'Pagina De Administrare - Afisare Licitatii';
		break;

	case 'search':
		$content    = 'search.php';
		$pageTitle  = 'Pagina De Administrare - Cautare Licitatii';
		break;

	case 'closed' :
		$content    = 'list_closed.php';
		$pageTitle  = 'Pagina De Administrare - Modifica Licitatie';
		break;

	default :
		$content    = 'list_open.php';
		$pageTitle  = 'Pagina De Administrare - Afisare Licitatii';
}
$script = array('auction.js');
require_once '../include/template.php';
?>
